<template>
    <div>
        <!-- <h1>{{user.username}}</h1> -->
        <el-container>
            <XiaoLeftAside/>
            <el-container>
                <el-header class="myhander">
                    <HeaderIcon/>
                </el-header>
                <el-main>
                    <XiaoElMainTabs/>
                    <PerMainbody/>
                    <router-view></router-view>
                </el-main>
            </el-container>
        </el-container>
    </div>
</template>

<script>
import PerMainbody from './persionmainpage/XiaoperMainbody.vue'
import HeaderIcon from './persionmainpage/XiaoHeaderIcon.vue'
import XiaoLeftAside from './persionmainpage/XiaoLeftAside.vue'
import XiaoElMainTabs from './persionmainpage/XiaoEl-Main-Tabs.vue'
    export default {
        name:'XiaoperMain',
        components:{PerMainbody,HeaderIcon,XiaoLeftAside,XiaoElMainTabs,},
        mounted(){
            this.$bus.$on('newRouterchanged',(NewRouter,OldRouter)=>{
                if( OldRouter != 'xrefreshpageNothing'){
                    if( NewRouter == 'xedrecmanage'){
                        this.$router.push({name:'xrefreshpageNothing',params:{OldRouter:OldRouter}})
                    }
                }
            })
        },
		beforeDestroy() {
			this.$bus.$off('newRouterchanged')
		},
    }
</script>

<style scoped>
    .myhander{
        background-color: #b3bddd;
    }
    .myaside {
        color: #333;
    }
</style>